A Meta-Language for Typed Object-Oriented Languages

نویسنده

  • Giuseppe Castagna
چکیده

In [13] we defined the λ&-calculus, a simple extension of the typed λcalculus to model typed object-oriented languages. This paper is the continuation or, rather, the companion of [13] since it analyzes the practical counterpart of the theoretical issues introduced there. Indeed, to develop a formal study of type systems for object-oriented languages we define a meta-language based on λ& and we show, by a practical example, how it can be used it to prove properties of a language. To this purpose, we define a toy object-oriented language and its type-checking algorithm; then we translate this toy language into our meta-language. The translation gives the semantics of the toy language and a theorem on the translation of well-typed programs proves the correctness of the type-checker of the toy language. As an aside we also illustrate the expressivity of the λ&-based model by showing how to translate existing features like multiple inheritance and multiple dispatch, but also by integrating in the toy language new features directly suggested by the model, such as first-class messages, a generalization of the use of super and the use of explicit coercions. An important novelty with respect to previous systems is that we show how to model multiple dispatch also in the presence of a notion of receiver (i.e. of a privileged argument to which the message is passed), a notion that is absent in languages like CLOS.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A semantic model of a small typed functional language using Object-Z

The Object-Z notation is a good meta-language that can be used to specify denotational semantics of programming languages. It has been effectively applied to some categories of languages. These include the procedural languages, the object-oriented procedural languages [9] and specification languages [8]. To widen these catergories, this paper applies Object-Z to the specification of the semanti...

متن کامل

The Design of a Meta-level Architecture for the Beta Language

The design of a meta-level architecture for a compiled and statically typed object-oriented programming language is presented. The architecture provides compiled languages with suucient runtime information to implement a full-blown typed meta-level interface, including both introspective and introces-sory capabilities. The central component of the meta-level architecture is the runtime system. ...

متن کامل

A Typed Intermediate Language for Supporting Multiple Inheritance via Interfaces

Some object-oriented languages, such as Java and C#, provide interfaces as a feature for supporting a restricted form of multiple inheritance. Most typed intermediate languages for compiling object-oriented languages do not support interfaces or multiple inheritance. This paper describes a typed intermediate language that supports interface implementation strategies based on interface tables (i...

متن کامل

A Theory of Tagged Objects

Foundational models of object-oriented constructs typically model objects as records with a structural type. However, many object-oriented languages are class-based; statically-typed formal models of these languages tend to sacrifice the foundational nature of the record-based models, and in addition cannot express dynamic class loading or creation. In this paper, we explore how to model static...

متن کامل

A Theory of Tagged Objects

Foundational models of object-oriented constructs typically model objects as records with a structural type. However, many object-oriented languages are class-based; statically-typed formal models of these languages tend to sacrifice the foundational nature of the record-based models, and in addition cannot express dynamic class loading or creation. In this paper, we explore how to model static...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 151  شماره 

صفحات  -

تاریخ انتشار 1993